﻿using ETC.DLEDLightingSystemPlus.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ETC.DLEDLightingSystemPlus.Models
{
    public class ConfigInfo : Bandit.UI.MVVM.NotifyObject
    {
        private TestConfig _TestConfig;
        /// <summary>
        /// 测试配置
        /// </summary>
        public TestConfig TestConfig
        {
            get { return _TestConfig; }
            set
            {
                _TestConfig = value;
                OnPropertyChanged("TestConfig");
            }
        }



        public ConfigInfo()
        {
            //this._TestConfig = new TestConfig();

            //if(this._TestConfig.TestItems == null)
            //{
            //    this._TestConfig.InitTestConfig();
            //}
        }

        /// <summary>
        /// 克隆一个新对象
        /// </summary>
        /// <returns></returns>
        public ConfigInfo Clone()
        {
            ConfigInfo model = new ConfigInfo();

            this.CopyTo(model);

            return model;
        }

        /// <summary>
        /// 将值复制到指定的对象
        /// </summary>
        /// <param name="model"></param>
        public void CopyTo(ConfigInfo model)
        {
            model.TestConfig = this.TestConfig.Clone();
        }
    }
}
